Optimal. Leaf size=117 \[ -\frac {2 (11 A-B) \sin (c+d x)}{15 d \left (a^3 \cos (c+d x)+a^3\right )}+\frac {A \tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac {(7 A-2 B) \sin (c+d x)}{15 a d (a \cos (c+d x)+a)^2}-\frac {(A-B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2978, 12, 3770} \[ -\frac {2 (11 A-B) \sin (c+d x)}{15 d \left (a^3 \cos (c+d x)+a^3\right )}+\frac {A \tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac {(7 A-2 B) \sin (c+d x)}{15 a d (a \cos (c+d x)+a)^2}-\frac {(A-B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2978
Rule 3770
Rubi steps
\begin {align*} \int \frac {(A+B \cos (c+d x)) \sec (c+d x)}{(a+a \cos (c+d x))^3} \, dx &=-\frac {(A-B) \sin (c+d x)}{5 d (a+a \cos (c+d x))^3}+\frac {\int \frac {(5 a A-2 a (A-B) \cos (c+d x)) \sec (c+d x)}{(a+a \cos (c+d x))^2} \, dx}{5 a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{5 d (a+a \cos (c+d x))^3}-\frac {(7 A-2 B) \sin (c+d x)}{15 a d (a+a \cos (c+d x))^2}+\frac {\int \frac {\left (15 a^2 A-a^2 (7 A-2 B) \cos (c+d x)\right ) \sec (c+d x)}{a+a \cos (c+d x)} \, dx}{15 a^4}\\ &=-\frac {(A-B) \sin (c+d x)}{5 d (a+a \cos (c+d x))^3}-\frac {(7 A-2 B) \sin (c+d x)}{15 a d (a+a \cos (c+d x))^2}-\frac {2 (11 A-B) \sin (c+d x)}{15 d \left (a^3+a^3 \cos (c+d x)\right )}+\frac {\int 15 a^3 A \sec (c+d x) \, dx}{15 a^6}\\ &=-\frac {(A-B) \sin (c+d x)}{5 d (a+a \cos (c+d x))^3}-\frac {(7 A-2 B) \sin (c+d x)}{15 a d (a+a \cos (c+d x))^2}-\frac {2 (11 A-B) \sin (c+d x)}{15 d \left (a^3+a^3 \cos (c+d x)\right )}+\frac {A \int \sec (c+d x) \, dx}{a^3}\\ &=\frac {A \tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac {(A-B) \sin (c+d x)}{5 d (a+a \cos (c+d x))^3}-\frac {(7 A-2 B) \sin (c+d x)}{15 a d (a+a \cos (c+d x))^2}-\frac {2 (11 A-B) \sin (c+d x)}{15 d \left (a^3+a^3 \cos (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.04, size = 197, normalized size = 1.68 \[ \frac {\sec \left (\frac {c}{2}\right ) \cos \left (\frac {1}{2} (c+d x)\right ) \left (-5 (29 A-4 B) \sin \left (\frac {d x}{2}\right )+75 A \sin \left (c+\frac {d x}{2}\right )-95 A \sin \left (c+\frac {3 d x}{2}\right )+15 A \sin \left (2 c+\frac {3 d x}{2}\right )-22 A \sin \left (2 c+\frac {5 d x}{2}\right )+10 B \sin \left (c+\frac {3 d x}{2}\right )+2 B \sin \left (2 c+\frac {5 d x}{2}\right )\right )-240 A \cos ^6\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{30 a^3 d (\cos (c+d x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 185, normalized size = 1.58 \[ \frac {15 \, {\left (A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} + 3 \, A \cos \left (d x + c\right ) + A\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} + 3 \, A \cos \left (d x + c\right ) + A\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, {\left (11 \, A - B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (17 \, A - 2 \, B\right )} \cos \left (d x + c\right ) + 32 \, A - 7 \, B\right )} \sin \left (d x + c\right )}{30 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 4.31, size = 148, normalized size = 1.26 \[ \frac {\frac {60 \, A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac {60 \, A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 20 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 10 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 159, normalized size = 1.36 \[ \frac {A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \,a^{3}}-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3 d \,a^{3}}+\frac {B \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d \,a^{3}}-\frac {A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d \,a^{3}}-\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d \,a^{3}}+\frac {B \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d \,a^{3}}-\frac {7 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d \,a^{3}}+\frac {B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.57, size = 187, normalized size = 1.60 \[ -\frac {A {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}\right )} - \frac {B {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.25, size = 130, normalized size = 1.11 \[ \frac {2\,A\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {A-B}{4\,a^3}+\frac {3\,A+B}{4\,a^3}+\frac {3\,A-B}{4\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A-B\right )}{20\,a^3\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {A-B}{12\,a^3}+\frac {3\,A-B}{12\,a^3}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \sec {\left (c + d x \right )}}{\cos ^{3}{\left (c + d x \right )} + 3 \cos ^{2}{\left (c + d x \right )} + 3 \cos {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\cos ^{3}{\left (c + d x \right )} + 3 \cos ^{2}{\left (c + d x \right )} + 3 \cos {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________